home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1994 March / Internet Info CD-ROM (Walnut Creek) (March 1994).iso / networking / mail / mh / contrib / 9210 / bipp.shar / bipp.info < prev   
Internet Message Format  |  1992-10-22  |  2KB

  1. Date:    Thu, 24 Sep 92 11:43:54 EDT
  2. From:    Jerry Peek <jerry@ora.com>
  3. To:      Jerry Sweet <jsweet@irvine.com>
  4. Subject: Re: MH tweaks wanted 
  5. In-reply-to: Message from Jerry Sweet <agate!usenet.ins.cwru.edu!magnus.acs.ohio-state.edu!sample.eng.ohio-state.edu!zaphod.mps.ohio-state.edu!usc!news!shrike.irvine.com!jsweet@ucbvax.berkeley.edu> 
  6.      of "22 Sep 92 21:32:46 +0000." <Bv016M.J7t@irvine.com> 
  7. Message-ID: <545.717349434@rubble>
  8.  
  9. > 1. A facility whereby the output of a program invocation can be
  10. >     placed into message headers, possibly via an escape
  11. >     sequence in a comp/repl/forw components template and/or
  12. >     an mhl template.  Sort of like shell back-ticks.  This
  13. >     would allow me to call programs that print various kinds of
  14. >     information, such as the current folder name, for inclusion
  15. >     in a header component.
  16.  
  17. That was an interesting problem.  I hacked up a "nawk" editor script
  18. that does what you want, I think.  I always like to post stuff like this
  19. to the list so other people can see the technique and comment on it...
  20. but I decided to send it to you privately to see if it's what you're
  21. thinking of.  (BTW, when your message got to the mh-users mailing list
  22. from USENET, there was no reply-able address on it.  I added yours by
  23. hand, but I wonder if anyone else is having trouble answering you?)
  24.  
  25. Anyway, you run this script from your MH profile.  It's a front-end
  26. that calls prompter after it's edited your message:
  27.  
  28.     comp: -editor bipp
  29.     repl: -editor bipp
  30.     forw: -editor bipp
  31.  
  32. Here's a sample "components" file:
  33.  
  34.     To: 
  35.     Cc: 
  36.     Fcc: `folder -fast`
  37.     X-local-time: `date`
  38.     Subject:
  39.     -----------
  40.     This should not be expanded: `date`
  41.  
  42. And here's a test run.  I typed in the "To:" and "Subject:" from the
  43. keyboard:
  44.  
  45.     % comp -editor bipp -form /tmp/components
  46.     To: jerry
  47.     Cc: 
  48.     Fcc: inbox
  49.     X-local-time: Thu Sep 24 11:40:23 EDT 1992
  50.     Subject: test test
  51.  
  52.     --------Enter initial text
  53.  
  54.     ^D
  55.     This should not be expanded: `date`
  56.     --------
  57.  
  58.     What now? q d
  59.